/** Created by CUIJA on 05-19-2017.*/

var angular = require('angular');


var coreRoutes = require('./routes/core.routes');

// register service
var navMenuService = require('./services/menu.service');
var homeService = require("./services/home.client.service");
var foodService = require("./services/food.client.service");
var shoppingCartService = require("./services/shoppingCart.client.service")
var loginService = require('./services/login.service');
var registerService = require('./services/register.service');
var orderService = require('./services/order.service');
var addressService = require('./services/address.service');
var calculateService = require('./services/calculate.service');

// register controller
var navbarController = require('./components/navbar/navbar.controller');
var navbarComponent = require('./components/navbar/navbar');
var homeController = require('./controllers/home.client.controller');
var foodController = require('./controllers/food.client.controller');
var shoppingCartController = require('./controllers/shoppingCart.client.controller');
var loginController = require('./controllers/login.controller');
var registerController = require('./controllers/register.controller');
var orderController = require('./controllers/order.controller');
var addressController = require('./controllers/address.controller');
var calculateController = require('./controllers/calculate.controller');

const moduleName = 'core';

angular.module(moduleName, [])
  .config(coreRoutes)
  .factory('navMenuService', navMenuService)
  .factory('homeService', homeService)
  .factory('foodService', foodService)
  .factory('shoppingCartService', shoppingCartService)
  .factory('loginService', loginService)
  .factory('registerService', registerService)
  .factory('orderService', orderService)
  .factory('addressService', addressService)
  .factory('calculateService', calculateService)

  .component('navbar', navbarComponent)
  .controller('navbarController', navbarController)
  .controller("homeController", homeController)
  .controller('foodController', foodController)
  .controller('shoppingCartController', shoppingCartController)
  .controller('loginController', loginController)
  .controller('registerController', registerController)
  .controller('orderController', orderController)
  .controller('addressController', addressController)
  .controller('calculateController', calculateController)
  ;

module.exports = moduleName;